<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <title>
        Sample of Silverlight AJAX bridge
    </title>
    <script src="http://localhost:23457/gestalt/js/jquery.js" type="text/javascript"></script>
    <script src="http://localhost:23457/gestalt/js/gestalt.js" type="text/javascript"></script>
</head>
<body>
    <div id="test"></div>
    <xml id="Animatord" class="xaml" Height="800" Width="600" style="display:none;">
        <StackPanel x:Name="rootElement"> 
            <StackPanel.Resources> 
                <Storyboard x:Name="myStoryboard">
                    <DoubleAnimation
                      Storyboard.TargetName="box"
                      Storyboard.TargetProperty="Opacity"
                      From="1.0" To="0.0" Duration="0:0:1" 
                      AutoReverse="True" 
                      RepeatBehavior="Forever" />
               </Storyboard>
            </StackPanel.Resources>
            <Rectangle x:Name="box" Width="100" Height="100" Fill="Blue" />
          </StackPanel> 
    </xml>
    
    <script language="python" class="Animatord">
def moveItMoveIt(object, mouseButtonEventArgs):
    me.rootElement.myStoryboard.Begin()
    tb = TextBox()
    tb.Text = "Clicked here!"
    me.rootElement.Children.Add(tb)
   
me.box.MouseLeftButtonDown += moveItMoveIt
document.test.innerHTML = "CLICK ZE BOX!"
    </script>
</body>
</html>